#ifndef STDARG_H_
#define STDARG_H_


typedef char *va_list;

#define STACKITEM int

#define VA_SIZE(TYPE)\
  ((sizeof(TYPE) + sizeof(STACKITEM) - 1)	\
   & ~(sizeof(STACKITEM) - 1))

#define	va_start(AP, LASTARG)			\
  (AP= (va_list)&(LASTARG) + VA_SIZE(LASTARG))

#define va_end(AP) (AP = (va_list)0)

#define va_arg(AP, TYPE)					\
  (*(TYPE *)((AP += VA_SIZE(TYPE))- VA_SIZE(TYPE)))

#endif
